var formatJr = function(data,height,width,showZero){
	   	     if(height==null||height==""){
	   	     	height='26';
	   	     }
	   	    if(width==null||width==""){
	   	    	width='120';
	 	     }
	   	     if(showZero==null||showZero==""){
	   	     	showZero=false;
	   	     }
	   	    var currencyDigits=data;
	   	    var MAXIMUM_NUMBER =  99999999999.99;
	   	    var MINMUM_NUMBER  = -99999999999.99;
	   	    //字体颜色
	   		var span1='<span style="color:black;">';
	   		var span2='</span>';
	   		if(currencyDigits==""||currencyDigits==null)currencyDigits="0";
	   		//去空格
	   		currencyDigits=cTrim(currencyDigits,0);
	   		
	   		if(!(/^(\+|-)?(0|[1-9]\d*)(\.\d*[1-9])?$/g.test(currencyDigits))){
	   			currencyDigits="";
	   		}
	   		// Normalize the format of input digits:
	   		currencyDigits = currencyDigits.replace(/,/g, ""); // Remove comma delimiters.
	   		if(currencyDigits!='0'||showZero==false){
	   		currencyDigits = currencyDigits.replace(/^0+/, ""); // Trim zeros at the beginning.
	   		}
	   		/**
	   		 * 负数时候去掉符号,字体为红色
	   		 */
	   		if(Number(currencyDigits)<0){
	   			if(Number(currencyDigits) < MINMUM_NUMBER) {
	   				currencyDigits= "";
	   		    }
	   		    currencyDigits=currencyDigits.replace(/-/,"");
	   			span1='<span style="color:red;">';
	   			span2='</span>';
	   		}else{
	   		    currencyDigits=currencyDigits.replace(/\+/,"");
	   		    // Assert the number is not greater than the maximum number.
	   			if (Number(currencyDigits) > MAXIMUM_NUMBER) {
	   				currencyDigits= "";
	   			}
	   		}
	   		var str=[];
	   		//产生金额线
	   		//currencyDigits="";
	   		if(currencyDigits.length>0){
	   			str[str.length]='<table style="height:'+height+'px;width:'+width+'px;" class="score">';
	   	        str[str.length]='<tr>';
	   			var parts = currencyDigits.split(".");
	   			if (parts.length > 1) {
	   				var integral = parts[0];
	   				var decimal = parts[1];
	   				// Cut down redundant decimal digits that are after the second.
	   				decimal = decimal.substr(0, 2);
	   		    }else{
	   				var integral = parts[0];
	   				var decimal = "";
	   		    }
	   			var n=(integral.length-1);
	   			var i=0;
	   			var str1=[];
	   			while(i<=10){
	   				var tem="";
	   				if(n>=0){
	   					tem=integral.substr(n, 1);
	   					n--;
	   				}
	   				if(i==0){
	   					str1[str1.length]='<td class="vline_red">'+span1+tem+span2+'</td>';
	   				}
	   				else if(i%3==0){
	   					str1[str1.length]='<td class="vline_green">'+span1+tem+span2+'</td>';
	   				}else{
	   					str1[str1.length]='<td >'+span1+tem+span2+'</td>';
	   				}
	   				i++;
	   			}
	   			str1.reverse();
	   			for(var x=0;x<2;x++){
	   				if(x<decimal.length){
	   					str1[str1.length]='<td >'+span1+decimal.substr(x,1)+span2+'</td>';
	   				}else{
	   					str1[str1.length]='<td>'+span1+0+span2+'</td>';
	   				}
	   			}
	   			str=str.concat(str1);
	   			str[str.length]='</tr>';
	   			str[str.length]='</table>';
	   			
	   		}else{
	   			str[str.length]='<table style="height:'+height+'px;width:'+width+'px;" class="score">';
	   			str[str.length]='<tr>                         ';
	   			str[str.length]='<td ></td>                   ';
	   			str[str.length]='<td class="vline_green"></td>';
	   			str[str.length]='<td ></td>                   ';
	   			str[str.length]='<td ></td>                   ';
	   			str[str.length]='<td class="vline_green"></td>';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='<td class="vline_green"></td>';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='<td class="vline_red"></td>  ';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='<td></td>                    ';
	   			str[str.length]='</tr>                        ';
	   			str[str.length]='</table>                     ';
	   		}
	   	    return str.join("");
	    };

	   /**
	    * 去空格函数 
	    * iType 0 去首尾空格
	    */
	   function cTrim(sInputString,iType)
	   {
	   	var sTmpStr = ' '
	   	var i = -1
	   	
	   	if(iType == 0 || iType == 1)
	   	{
	   	while(sTmpStr == ' ')
	   	{
	   	++i
	   	sTmpStr = sInputString.substr(i,1)
	   	}
	   	sInputString = sInputString.substring(i)
	   	}
	   	
	   	if(iType == 0 || iType == 2)
	   	{
	   	sTmpStr = ' '
	   	i = sInputString.length
	   	while(sTmpStr == ' ')
	   	{
	   	--i
	   	sTmpStr = sInputString.substr(i,1)
	   	}
	   	sInputString = sInputString.substring(0,i+1)
	   	}
	   	return sInputString
	   }
	   
	   
	   function number_format(number, decimals, dec_point, thousands_sep) {
			　　/*
			　　 * 参数说明：
			　　 * number：要格式化的数字
			　　 * decimals：保留几位小数
			　　 * dec_point：小数点符号
			　　 * thousands_sep：千分位符号
			　　 * */
			　　 number = (number + '').replace(/[^0-9+-Ee.]/g, '');
			　　 var n = !isFinite(+number) ? 0 : +number,
			　　 prec = !isFinite(+decimals) ? 2 : Math.abs(decimals),
			 　　sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
			 　　dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
			 　　s = '',
			　　 toFixedFix = function(n, prec) {
			 　　　　var k = Math.pow(10, prec);
			 　　　　return '' + Math.ceil(n * k) / k;
			 　　};

			 　　s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
			　　 var re = /(-?\d+)(\d{3})/;
			　　 while(re.test(s[0])) {
			 　　　　s[0] = s[0].replace(re, "$1" + sep + "$2");
			 　　}

			 　　if((s[1] || '').length < prec) {
			    　　 s[1] = s[1] || '';
			     　　s[1] += new Array(prec - s[1].length + 1).join('0');
			 　　}
			  　　　　return s.join(dec);
			 }
		